<script>
    function lazyload() {
        var temp1 = window.innerHeight || document.documentElement.clientHeight
        var temp2 = document.body.scrollTop || document.documentElement.scrollTop
        var maxShowHeight = temp1 + temp2
        var imgs = document.querySelectorAll('img')
        imgs.forEach(function(item, index) {
            if (item.offsetTop < maxShowHeight) {
                item.src = item.getAttribute('src-real')
            }
        })
    }
</script>